package com.exam.qc.model;

import java.io.Serializable;
import java.util.List;

//分页类
public class PageVo<T> implements Serializable {
    private Integer pageNo;
    private Integer pageSize;
    private Integer totalCount;
    private Integer pageCount;
    private List<T> list;

    public PageVo(Integer pageNo,Integer pageSize,Integer totalCount,List<T> list) {
        this.setPageNo(pageNo);
        this.setPageSize(pageSize);
        this.setTotalCount(totalCount);
        this.setList(list);
        this.pageCount = this.totalCount % this.pageSize == 0 ? (this.totalCount / this.pageSize) : (this.totalCount / this.pageSize + 1);
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getPageCount() {
        return pageCount;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
